<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexIdxProjectIdModuleCodeDemandTypeInNoteTable extends AbstractMigration
{
    public function up()
    {
        $this->table('note')
            ->addIndex(['project_id', 'module_code', 'demand_type'], ['type' => 'normal', 'name' => 'idx_project_module_code_demand_type'])
            ->save();

    }

    public function down()
    {
        $this->table('note')->removeIndexByName('idx_project_module_code_demand_type')->save();
    }
}
